<template>
  <div>
    <h1>精品推荐</h1>
    <ul>
      <router-link tag="li" :to="i.Info" v-for="(i, item) in arr" :key="item">
        <img :src="i.lujing" alt="" />
        <h5>{{ i.shangpin }}</h5>
        <p>
          <span class="huiyuan"
            >原价<del>￥{{ i.yuanjia }}</del></span
          ><span class="honggui"
            >促销价<b>￥{{ i.cuxiao }}</b></span
          >
        </p>
      </router-link>
    </ul>
  </div>
</template>
<script>
import axios from 'axios'
export default {
  data() {
    return {
      arr: [
        {
          shangpin: "诺泰暖宫护腰艾灸加热女生必备神器",
          lujing: require("./img2/nuotai01.jpg"),
          yuanjia: "636.00",
          cuxiao: "208.00",
          Info:'/info'
        },
        {
          shangpin: "七喜柠檬味碳酸饮料整箱330ml*24促销装",
          yuanjia: "48.90",
          cuxiao: "43.90",
          lujing: require("./img2/qixi01.jpg"),
          Info:'/info2'

        },
        {
          shangpin: "八马茶叶 铁观音茶叶浓香型赛珍珠1000g",
          yuanjia: "800.00",
          cuxiao: "600.00",
          lujing: require("./img2/bama01.jpg"),
          Info:'/info4'

        },
        {
          shangpin: "Lee男装 2018春夏X-LINE白色短袖T恤 秒变男神",
          yuanjia: "350.00",
          cuxiao: "239.00",
          lujing: require("./img2/Lee01.jpg"),
          Info:'/info3'
        },
      ],
    };
  },
};
</script>
<style scoped>
h5 {
  font-size: 20px;
  text-align: center;
  font-weight: 400;
  width: 284px;
  margin-left: 60px;
}
.huiyuan {
  color: #ccc;
  font-size: 14px;
}
.honggui {
  color: #ccc;
  font-size: 12px;
  margin-left: 5px;
}
.honggui b {
  margin-left: 5px;
  color: red;
  font-size: 16px;
}
ul {
  width: 100%;
  height: 500px;
  overflow: hidden;
}
ul p {
  height: 50px;
  line-height: 40px;
  padding-left: 90px;
}
ul li {
  width: 25%;
  height: 72%;
  box-sizing: border-box;
  float: left;
}
ul li img {
  width: 95%;
  margin-left: 10px;
  height: 100%;
}
h1 {
  width: 100%;
  height: 80px;
  line-height: 80px;
  padding-left: 20px;
  box-sizing: border-box;
  text-align: left;
  float: left;
}
</style>
<style>
* {
  margin: 0;
  padding: 0;
}
a {
  text-decoration: none;
}

ul,
li {
  list-style: none;
}

.fl {
  float: left;
}

.fr {
  float: right;
}
/* 版心-页面的一个共同宽度 容器 啃忒内儿 */
.container {
  width: 1180px;
  margin-left: auto;
  margin-right: auto;
}
/* 最最最重要的就是我们清除浮动 */
.clearfix {
  *zoom: 1;
  /* IE6/7兼容 */
}
.clearfix:after {
  display: table;
  content: " ";
  clear: both;
}
.clearfix:after {
  display: block;
  content: " ";
  clear: both;
}
</style>
